<?php
defined('IN_IXDCW') or exit('Access Denied');
require DT_CORE.'/'.$module.'/common.inc.php';
require DT_CORE.'/buyhelp/common.inc.php';
//$navname???
//给数组中的数组取名
$navname ='guide';
$order= 'addtime desc';

if($cartypeid == 1) $filter['ctp'] =433;
if($cartypeid == 2 ) $filter['ctp'] =434;
if($cartypeid == 3 ) $filter['ctp'] =435;
if($cartypeid == 4) $filter['cen'] =432;

require_once DT_INC . '/search/listAuto.inc.php';

if ($autoFilter) {

    $carids   = $carids ? $carids : array('-');
    $brandids = $brandids ? $brandids : array('-');
   //车型
    $condition = " arcid in (" . Sql::in($carids) . ")";

   $condition .= " and arbid in (" . Sql::in($brandids) . ")";
}

//幻灯图片
$picList = $db->getAll("select title,thumb,itemid,addtime from {$db->getPre()}guide where status=3  and level=7 and  catid in (3592,3593,3594,3595,5146) and thumb!='' order by {$order} limit 6");

//$topList综合导购
$complexList= $db->getAll("select title,itemid,addtime from {$db->getPre()}guide where status=3    and level=6 and $condition  order by {$order} limit 8");
//$list= $db->getAll("select title,thumb,itemid,addtime from {$db->getPre()}guide where status=3 and $condition   order by {$order} limit ". ($pn->getPage() - 1) * $pagesize . ',' . $pagesize);
//新车图解
$sql = "select title,thumb,itemid,addtime from {$db->getPre()}guide where status=3 and $condition and catid=3593  order by {$order} limit 8";

$newCarGraphic= $db->getAll($sql);

//导购手册
$guideManual= $db->getAll("select title,thumb,itemid,addtime from {$db->getPre()}guide where status=3 and $condition and catid=3594 order by {$order} limit 8");

//降价
$priceReduction= $db->getAll("select title,thumb,itemid,addtime from {$db->getPre()}price where status=3   and $condition order by {$order} limit 8");


//车型对比
$compareModels= $db->getAll("select title,thumb,itemid,addtime from {$db->getPre()}guide where status=3 and $condition and catid=3595  order by {$order} limit 8");

//碰撞安全
$crashSafety = $db->getAll("select title,thumb,itemid,addtime from {$db->getPre()}guide where status=3 and $condition and catid=5146  order by {$order} limit 8");

//车贷
$carLoan = $db->getAll("select title,itemid,addtime from {$db->getPre()}information where status=3  and catid=5153 order by {$order} limit 8");


$seo_file = 'index';
include DT_INC.'/seo.inc.php';
include template('index', $module);